home *** CD-ROM | disk | FTP | other *** search
- Path: nntp1.best.com!donstarr
- From: super@donstarr.org (Don Starr)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: sizeof() question >>> :)
- Date: Thu, 18 Apr 96 04:14:12 GMT
- Organization: Best Internet Communications
- Message-ID: <4l4fik$1a8_005@donstarr.best.com>
- References: <1996Apr12.061927@topaz> <31714828.1574068@news.linex.com> <4l0dcr$14t0@darwin.nbnet.nb.ca> <danpop.829678939@news.cern.ch>
- NNTP-Posting-Host: donstarr.vip.best.com
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <danpop.829678939@news.cern.ch>,
- danpop@mail.cern.ch (Dan Pop) wrote:
- *>
- *> If you allocate the space for the array you can call one of the memory
- *> routines which return the size of the allocation.
- *> Dave Gaudet via Rick Bruce
- *
- *There is no such "routine" in the C language.
- *
- *Dan
-
- Technically, there is no such _any_ routine in the C language. The language
- doesn't define any functions - "standard" libraries do.
-
- As to the original question, if you know how your heap is structured (from
- the source to your malloc(), new, or whatever), you can get the size of any
- allocation from it.
-
- Don
-